<docs>
  ## my-bread 组件，通用头部组件
  ## props
  * type <index|common> 标题类型
  * title 主标题
</docs>
<template>
  <div class="header" :class="type">
    <span class="arrow" @click="back_btn" v-show="goback"></span>
    <h3 class="title"> {{title}}</h3>
  </div>
</template>
<script>
export default {
  name: 'my-bread',
  props: {
    type: {
      type: String,
      default: ''
    },
    title: {
      type: String,
      default: ""
    },
    goback:{
      type:Boolean,
      default:false
    }
  },
  methods:{
    // 按钮点击
    back_btn() {
      this.$router.goBack();
    },
  },
};
</script>

<style lang="scss" scoped>
.header{

}
</style>


